package com.julian.decoratorPattern;

public class Mocha extends CondimentDecorator {
    Beverage beverage;

    public Mocha(Beverage beverage) {
        this.beverage = beverage;
        size = beverage.getSize();
    }

    @Override
    public String getDescription() {
        return beverage.getDescription() + "Mocha";
    }

    @Override
    public double cost() {
        if (beverage.getSize().equals("tall")){
            return .10 + beverage.cost();
        }else if (beverage.getSize().equals("grande")){
            return .15 + beverage.cost();
        }
        return .20 + beverage.cost();
    }
}
